//
//  NSDictionary+Parameters.h
//  QTCategory
//
//  Created by 张俊博 on 2016/10/17.
//  Copyright © 2016年 CISDI. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDictionary (Parameters)

+ (void)setDefaultURLQueryKeyPrefix:(NSString*)delimiter;
+ (NSString*)defaultURLQueryKeyPrefix;
+ (void)setDefaultURLQueryKeyPostfix:(NSString*)delimiter;
+ (NSString*)defaultURLQueryKeyPostfix;
+ (void)setDefaultURLQueryPairsDelimiter:(NSString*)delimiter;
+ (NSString*)defaultURLQueryPairsDelimiter;

+ (NSDictionary*)objectsFromURLQueryString:(NSString*)query;
+ (NSDictionary*)objectsFromURLQueryString:(NSString*)query withPairsDelimiter:(NSString*)delimiter keyPrefix:(NSString*)keyPrefix keyPostFix:(NSString*)keyPostfix;

+ (NSDictionary *)parametersFromString:(NSString *)string;
- (NSString *)parametersString;

@end

@interface NSMutableDictionary (Parameters)
- (void)setObject:(NSString*)value forURLQueryKeyPath:(NSString*)keyPath;
- (void)setObject:(NSString*)value forURLQueryKeyPath:(NSString*)keyPath keyPrefix:(NSString*)keyPrefix keyPostfix:(NSString*)keyPostfix;
@end
